const router = require('express').Router();
const userRoute = require('./user/userRoutes');
const learnRoute = require('./learn/learnRouters');
const questionRoute = require('./question/questionRouter');
const adminRoute = require('./admin/adminRouter');
const judgeRoute = require('./judge/judgeRouter');
const articleRoute = require('./article/articleRouter');
const middleware = require("../utils/checkToken");
const uploadImg = require('../utils/uploadImg');

router.use('/user', userRoute);
router.use('/learn', learnRoute);
router.use('/question', questionRoute);
router.use('/admin', adminRoute);
router.use('/judge', judgeRoute);
router.use('/article', articleRoute);

// 上传图片
router.post('/UploadImage', uploadImg.uploadImg);
// 批量删除图片
router.delete('/DeleteImage', uploadImg.deleteImg);

module.exports = router;
